﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ProjectSchema"
    targetNamespace="http://tempuri.org/ProjectSchema.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/ProjectSchema.xsd"
    xmlns:mstns="http://tempuri.org/ProjectSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:element name="LiveCodeProjects">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Project" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="User" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Role" minOccurs="1" maxOccurs="1">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:enumeration value="Admin"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="ClientLocation" minOccurs="1" maxOccurs="1" type="xs:string"/>
                  </xs:sequence>
                  <xs:attribute name="id">
                    <xs:simpleType>
                      <xs:restriction base="xs:integer">
                        <xs:minInclusive value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
              <xs:element name="Files" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="ServerLocation" type="xs:string"/>
                    <xs:element name="RelativePaths">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="FilePath" type="xs:string" maxOccurs="unbounded"/>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" use="required">
              <xs:simpleType>
                <xs:restriction base="xs:integer">
                  <xs:minInclusive value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="name" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
